package com.example.apiversioncontroldemo.util.vcon;

import lombok.Getter;

/**
 * @author chen.cr
 * @since 2023/11/1
 */
public class IllegalApiVersionException extends RuntimeException{

    @Getter
    private int minimumVersion;

    public IllegalApiVersionException(int minimumVersion) {
        this.minimumVersion = minimumVersion;
    }

    @Override
    public String getMessage() {
       return String.format("API版本不兼容！最小可兼容版本为：v%d", minimumVersion);
    }

}
